<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateJobsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('jobs', function (Blueprint $table) {
            $table->increments('id');
            $table->string('name')->comment('职位名字');
            $table->integer('sector_id')->comment('部门id');
            $table->text('describe')->comment('职位描述');
            $table->string('explain')->comment('说明');
            $table->text('telephone')->comment('联系方式');
            $table->timestamps();
        });

        Schema::create('sectors', function (Blueprint $table) {
            $table->increments('id');
            $table->string('name')->comment('部门名字');
            $table->timestamps();
        });

    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('jobs');
        Schema::dropIfExists('sectors');
    }
}
